<%--
Copyright (C) 2008 Jackson Harper (jackson@ximian.com)

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
--%>

<%@ Control Language="C#" ClassName="GrurrahVacantControl" Inherits="Grr.Web.GrurrahControl" %>
<%@ Register Assembly="Gaia.WebWidgets" Namespace="Gaia.WebWidgets" TagPrefix="gaia" %>

<%@ Import Namespace="Grr.Web" %>
<%@ Import Namespace="Grr.Model" %>

<script runat="server">

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);

       if (!IsPostBack)
       {
            string name = Request.QueryString["g"];
            if (name != null)
            {
                VacantTitle.Text = name;
                CreateGrurrahLinkButton.Text = String.Concat("Click here to create the ", GrurrahString.ToUserString (name), " page.");
            }
       }
    }

    protected void CreateGrurrahLinkButton_Click(object sender, EventArgs e)
    {
        RaiseBubbleEvent(this, new GrurrahPageModeChangedEventArgs(GrurrahPageMode.Create));
    }
</script>

<gaia:Panel ID="CreationPanel" style="margin: 15px 15px 15px 15px" runat="server">
        No Grurrah has been found that matches the name <gaia:label id="VacantTitle" runat="server" />.
        <br />
        <br />
        You may:
        <ul>
            <li><gaia:LinkButton ID="CreateGrurrahLinkButton" runat="server" Text="Click here to create the Grurrah." OnClick="CreateGrurrahLinkButton_Click" /></li>.
        </ul>
</gaia:Panel>
